import os
from time import sleep
from selenium import webdriver
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options


# 打开浏览驱动器
chrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
driver = webdriver.Chrome(options = chrome_options)
driver.implicitly_wait(3)

driver.get('https://home.test.rabbitpre.com/marketing/myapp')

#最大化窗口
driver.maximize_window()
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div[1]/span[2]').click()
driver.find_element_by_css_selector('body > div.auth-panel > div > div.login-form.form.active > div.second-tab-tuzhan.second-tab.active > div.account.form-account > input').send_keys('18544444444')
driver.find_element_by_css_selector('body > div.auth-panel > div > div.login-form.form.active > div.second-tab-tuzhan.second-tab.active > div.password.form-password > input').send_keys('123456')
driver.find_element_by_css_selector('body > div.auth-panel > div > div.login-form.form.active > div.second-tab-tuzhan.second-tab.active > button').click()
sleep(3)








